package com.labreeze.spring.aop.aspect;

import org.springframework.aop.aspectj.annotation.AspectJProxyFactory;

import com.labreeze.spring.aop.advice.NaiveWaiter;
import com.labreeze.spring.aop.advice.Waiter;

public class AspectJProxyTest {

	
	public static void main(String[] args) {
		 Waiter target=new NaiveWaiter();
		 AspectJProxyFactory factory=new AspectJProxyFactory();
		 factory.setTarget(target);
		 factory.addAspect(PreGreetingAspect.class);
		 Waiter proxy=(Waiter)factory.getProxy();
		 proxy.greetTo("jack");
	}
	
}
